// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_c.p_a;


// Referenced classes of package com.nnee.c.a:
//            a

public class cls_c extends cls_a
{

    public cls_c()
    {
        g = new int[80];
        b();
    }

    public cls_c(cls_c c1)
    {
        super(c1);
        g = new int[80];
        b = c1.b;
        c = c1.c;
        d = c1.d;
        e = c1.e;
        f = c1.f;
        System.arraycopy(c1.g, 0, g, 0, c1.g.length);
        h = c1.h;
    }

    private int a(int i1, int j1)
    {
        return i1 << j1 | i1 >>> 32 - j1;
    }

    private int a(int i1, int j1, int k1)
    {
        return i1 & j1 | k1 & ~i1;
    }

    private void a(int i1, byte abyte0[], int j1)
    {
        abyte0[j1] = (byte)(i1 >>> 24);
        abyte0[j1 + 1] = (byte)(i1 >>> 16);
        abyte0[j1 + 2] = (byte)(i1 >>> 8);
        abyte0[j1 + 3] = (byte)i1;
    }

    private int b(int i1, int j1, int k1)
    {
        return k1 ^ (i1 ^ j1);
    }

    private int c(int i1, int j1, int k1)
    {
        return i1 & j1 | i1 & k1 | j1 & k1;
    }

    protected void a(long l1)
    {
        if(h > 14)
            c();
        g[14] = (int)(l1 >>> 32);
        g[15] = (int)(-1L & l1);
    }

    protected void a(byte abyte0[], int i1)
    {
        int ai[] = g;
        int j1 = h;
        h = j1 + 1;
        ai[j1] = (0xff & abyte0[i1]) << 24 | (0xff & abyte0[i1 + 1]) << 16 | (0xff & abyte0[i1 + 2]) << 8 | 0xff & abyte0[i1 + 3];
        if(h == 16)
            c();
    }

    public int b(byte abyte0[], int i1)
    {
        a();
        a(b, abyte0, i1);
        a(c, abyte0, i1 + 4);
        a(d, abyte0, i1 + 8);
        a(e, abyte0, i1 + 12);
        a(f, abyte0, i1 + 16);
        b();
        return 20;
    }

    public void b()
    {
        super.b();
        b = 0x67452301;
        c = 0xefcdab89;
        d = 0x98badcfe;
        e = 0x10325476;
        f = 0xc3d2e1f0;
        h = 0;
        for(int i1 = 0; i1 != g.length; i1++)
            g[i1] = 0;

    }

    protected void c()
    {
        for(int i1 = 16; i1 <= 79; i1++)
            g[i1] = a(g[i1 + -3] ^ g[i1 + -8] ^ g[i1 + -14] ^ g[i1 + -16], 1);

        int j1 = b;
        int k1 = c;
        int l1 = d;
        int i2 = e;
        int j2 = f;
        for(int k2 = 0; k2 <= 19;)
        {
            int j5 = 0x5a827999 + (j2 + (a(j1, 5) + a(k1, l1, i2)) + g[k2]);
            int k5 = a(k1, 30);
            k2++;
            k1 = j1;
            j1 = j5;
            j2 = i2;
            i2 = l1;
            l1 = k5;
        }

        for(int l2 = 20; l2 <= 39;)
        {
            int l4 = 0x6ed9eba1 + (j2 + (a(j1, 5) + b(k1, l1, i2)) + g[l2]);
            int i5 = a(k1, 30);
            l2++;
            k1 = j1;
            j1 = l4;
            j2 = i2;
            i2 = l1;
            l1 = i5;
        }

        for(int i3 = 40; i3 <= 59;)
        {
            int j4 = 0x8f1bbcdc + (j2 + (a(j1, 5) + c(k1, l1, i2)) + g[i3]);
            int k4 = a(k1, 30);
            i3++;
            k1 = j1;
            j1 = j4;
            j2 = i2;
            i2 = l1;
            l1 = k4;
        }

        for(int j3 = 60; j3 <= 79;)
        {
            int l3 = 0xca62c1d6 + (j2 + (a(j1, 5) + b(k1, l1, i2)) + g[j3]);
            int i4 = a(k1, 30);
            j3++;
            k1 = j1;
            j1 = l3;
            j2 = i2;
            i2 = l1;
            l1 = i4;
        }

        b = j1 + b;
        c = k1 + c;
        d = l1 + d;
        e = i2 + e;
        f = j2 + f;
        h = 0;
        for(int k3 = 0; k3 != g.length; k3++)
            g[k3] = 0;

    }

    public String d()
    {
        return "SHA-1";
    }

    public int e()
    {
        return 20;
    }

    private static final int a = 20;
    private static final int i = 0x5a827999;
    private static final int j = 0x6ed9eba1;
    private static final int k = 0x8f1bbcdc;
    private static final int l = 0xca62c1d6;
    private int b;
    private int c;
    private int d;
    private int e;
    private int f;
    private int g[];
    private int h;
}
